package ch6;
//教师
public class Teacher {
    private String name,sex,tool,subject;
    private int age, seniority;

    public Teacher(String name, String sex, String tool,
                   String subject, int age, int seniority) {
        this.name = name;
        this.sex = sex;
        this.tool = tool;
        this.subject = subject;
        this.age = age;
        this.seniority = seniority;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public Teacher(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getTool() {
        return tool;
    }

    public void setTool(String tool) {
        this.tool = tool;
    }

    public int getSeniority() {
        return seniority;
    }

    public void selfIntroduce(){
        System.out.println(this.subject+"老师的姓名是："+this.name+
                "\n年龄是："+this.age+"\n性别是："+this.sex+
                "\n教龄是："+this.seniority);
    }
    public void giveLession(){
        System.out.println(this.subject+this.name+"用"+this.tool+"上课。");

    }
}
